<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEnterpriseTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('enterprise', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')                          ->default('')   ->comment('商家名称');
            $table->string('contact')                       ->default('')   ->comment('联系方式');
            $table->string('contact_person')                ->default('')   ->comment('联系人');
            $table->string('company_name')                  ->default('')   ->comment('企业名称');
            $table->string('legal_person')                  ->default('')   ->comment('法人');
            $table->string('Unified_social_credit_code')    ->default('')   ->comment('统一社会信用代码');
            $table->integer('business_license_img_id')      ->default(0)    ->comment('营业执照的图片');
            $table->timestamp('end_time')                   ->nullable()          ->comment('到期时间');
            $table->integer('status')                       ->default(0)    ->comment('状态：0关闭，1开启');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('enterprise');
    }
}
